<#assign path = request.getContextPath() />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- <img src="../img/timg.jpg" align="center"> -->
		
		<h1 style="text-align: center;margin-top: 15%;font-size:36px;">
			欢迎进入安丰考勤系统
			<p id="show"></p> 
		</h1>
		
	</body>
	<script src="${path}/static/js/jquery.min.js"></script>
	<script>    
    $(function(){
        $("#show").showCurrentTime();
    })
	</script>
	<script>
		//动态的显示当前时间
		;(function($){
			"use strict";
			var time = "";
			//获得当前的时间
			function currentTime(){
				var nowDate = new Date();
				var year = nowDate.getFullYear();
				var month = changeNum(nowDate.getMonth()+1);
				var date = changeNum(nowDate.getDate());
				var hour = changeNum(nowDate.getHours());
				var miunte = changeNum(nowDate.getMinutes());
				//var second = changeNum(nowDate.getSeconds());

				return year+"-"+month+"-"+date+" "+hour+":"+miunte;    //+":"+second
			}
			function changeNum(t){
				return t < 10 ? "0" + t : t;
			}
			$.fn.showCurrentTime = function(){
				var div = $(this);
				return this.each(function(){
					setTimeout(function(){
						time = currentTime();
						div.text(time);                
					},1000);
				});
				
			};
		})(jQuery);
	</script>
</html>
